package com.lz.common.utils.xmlUtil;

import org.dom4j.io.SAXReader;
import org.junit.Test;

public class ReadXml {
    @Test
    public void main() {
        SAXReader reader = new SAXReader();
        try {
            org.dom4j.Document document = reader.read(this.getClass().getClassLoader().getResource("a.xml"));
            org.dom4j.Element rootElement = document.getRootElement();
            String empId = rootElement.element("emp_id").getText();
            System.out.println(empId);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
